package com.qfedu.provider.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户详情，个人资料
 *
 * @TableName db_user_detail
 */
@TableName(value = "db_user_detail")
@Data
public class DbUserDetail implements Serializable {
    /**
     * 用户详情id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 头像
     */
    private String photo;

    /**
     * 昵称
     */
    private String nickName;
    /*
     * 余额
     * */
    private Double balance;

    /**
     * 粉丝数量
     */
    private Integer fanNumber;

    /**
     * 简介
     */
    private String introduction;

    /**
     * 性别
     */
    private String gender;

    /**
     * 所在地
     */
    private String location;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 职业
     */
    private String profession;

    /**
     * 出生日期
     */
    private String birthday;

    /**
     * 二维码
     */
    private String qrCode;

    /**
     * 逻辑删除    1存在  0删除
     */
    private Integer deleted;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public DbUserDetail(Integer userId, String nickName) {
        this.createTime = new Date();
        this.deleted = 1;
        this.fanNumber = 0;
        this.updateTime = new Date();
        this.userId = userId;
        this.nickName = nickName;
    }
}